
package com.loser.csp.service.backmanager.enums;


/**
 * 
 * @author jun.li
 * @version $Id: MessageCode.java, v 0.1 2014-2-24 下午1:24:44 jun.li Exp $
 */
public enum MessageCodeEnum {    
    
    ADD_CATEGORY_PARAMETER_NULL("ADD_CATEGORY_PARAMETER_NULL","添加商品类型参数为空"),
    
    UPDATE_CATEGORY_PARAMETER_NULL("ADD_CATEGORY_PARAMETER_NULL","修改商品类型参数为空"); 
    private String code;
    
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    private MessageCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
    public static final MessageCodeEnum getCode(String code){
        MessageCodeEnum messageCodeEnum = null;
        for(MessageCodeEnum e : MessageCodeEnum.values()){
            if(e.getCode().equals(code)){
                messageCodeEnum= e;
                break;
            }
        }
        return messageCodeEnum;
    }
    
    

}
